/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.trainning.hanhpt.btvn1;

import java.util.Scanner;

/**
 *
 * @author Administrator
 */
public class Bai1M1 
{
    public static void main(String[] args) 
    {
         Scanner sc=new Scanner(System.in);
         int n=sc.nextInt();
         System.out.println(nguyento(n));
    }
    static boolean nguyento(int n)
    {
        if(n==0||n==1) return false;
        else
        {
            int k=(int) Math.sqrt(n);
            for(int i=2;i<=k;i++)
                if(n%2==0)
                    return false;
                    return true;
        }
    }
}

